package question

//2427. 公因子的数目
func commonFactors(a int, b int) int {
	count := 1
	i := 2
	for i <= a && i <= b {
		if a%i == 0 && b%i == 0 {
			count++
		}
		i++
	}
	return count
}
